package com.qdu.servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * 退出管理员登录的servlet
 *
 * @author Lenovo
 */
@WebServlet("/ems")
public class exitManagerServlet extends HttpServlet{

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        HttpSession session=req.getSession(false);
        if(null!=session)
        {
            session.invalidate();
            System.out.println("session摧毁");
        }
        req.getRequestDispatcher("registerManager.html").forward(req, resp);
    }

    
}
